package com.example.edu.Controller;

import com.example.edu.Dto.PictureUploadDtoG;
import com.example.edu.Dto.Return;
import com.example.edu.Service.PictureService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/picture")
public class PictureController {
    @Resource
    PictureService pictureService;

    @PostMapping("/upload")
    public Return upload(@RequestBody PictureUploadDtoG pictureUploadData){
        return pictureService.upload(pictureUploadData);
    }
}
